package com.qk.controller;

import com.qk.common.PageResult;
import com.qk.common.Result;
import com.qk.dto.LogDto;
import com.qk.entity.Log;
import com.qk.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: LogController
 * Package: com.qk.controller
 * Description:
 *
 * @Author zt
 * @Create 2025/8/7 19:29
 * @Version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/logs")
public class LogController {
    @Autowired
    private LogService logService;

    /*
    查询日志数据列表（分页查询）
     */
    @GetMapping
    public Result listLog(LogDto logDto) {
        log.info("查询日志数据列表：{}",logDto);
        PageResult<Log> pageResult = logService.listLog(logDto);
        return Result.success(pageResult);
    }
}
